#include <mc9s12dp512.h>     /* derivative information */
#include "stats.h"
#include "adc.h"

unsigned short getX(void)
{
	return adc_sample(0); 
}

unsigned short getY(void)
{
	return adc_sample(1);
}

unsigned short get_robot_heading(void)
{
	return adc_sample(ROBOTHEAD);
}

unsigned short get_turret_heading(void)
{
	return adc_sample(TURRETHEAD);
}

void get_scanner_stats(
		unsigned short* left,
		unsigned short* front,
		unsigned short* right)
{
	*left = adc_sample(0x04);
	*front = adc_sample(0x05);
	*right = adc_sample(0x06);
}

unsigned short get_health(void)
{
	return adc_sample(HEALTH);
}
